package com.l2emu.gameserver.handler.voicedcommandhandlers;

import com.l2emu.Config;
import com.l2emu.gameserver.handler.IVoicedCommandHandler;
import com.l2emu.gameserver.model.actor.instance.L2PcInstance;

/**
 * @author Rayan
 * @since 2017
 * @project L2Emu Project
 */

public class Version implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS = { "version", "date" };

	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
		if (command.startsWith("version"))
		{
			activeChar.sendMessage("L2Emu-GS Revision: " + Config.IMPLEMENTATION_BUILD);
			activeChar.sendMessage("L2Emu-DP Revision: " + Config.DATAPACK_REVISION);
		}
		else if (command.startsWith("date"))
		{
			activeChar.sendMessage("L2Emu-GS Build Date: " + Config.BUILD_DATE);
			activeChar.sendMessage("L2Emu-DP Build Date: " + Config.DATAPACK_BUILD_DATE);
		}
		return true;
	}

	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
}